package com.taobao.txc.resourcemanager.a.e;

import com.taobao.txc.parser.b.a.g;
import com.taobao.txc.parser.struct.TxcRuntimeContext;
import com.taobao.txc.resourcemanager.b.a.d;
import java.sql.SQLException;
import java.sql.Statement;

public class c<T>
  extends a<T>
{
  public c(com.taobao.txc.resourcemanager.b.a.a parama, d paramd, com.taobao.txc.resourcemanager.b.b.a.a<T> parama1, g paramg)
  {
    super(parama, paramd, parama1, paramg);
  }
  
  public T b(Object... paramVarArgs)
  {
    g localg = c();
    com.taobao.txc.resourcemanager.b.a.a locala = a();
    d locald = b();
    com.taobao.txc.resourcemanager.b.b.a.a locala1 = d();
    Object localObject1 = locala1.b(0);
    Statement localStatement = locald.f();
    TxcRuntimeContext localTxcRuntimeContext = locala.a(null);
    locala.setAutoCommit(false);
    try
    {
      String str = localg.g() + localg.d(locald) + " FOR UPDATE";
      localg.a(localg.a(locald, str));
      localObject1 = locala1.b(localStatement, paramVarArgs);
      localg.b(localg.b(locald, str));
      localTxcRuntimeContext.a(localg);
      locala.commit();
    }
    catch (Throwable localThrowable)
    {
      locala.rollback();
      throw new SQLException(localThrowable);
    }
    finally
    {
      locala.setAutoCommit(true);
    }
    return localObject1;
  }
  
  public T c(Object... paramVarArgs)
  {
    g localg = c();
    com.taobao.txc.resourcemanager.b.a.a locala = a();
    d locald = b();
    com.taobao.txc.resourcemanager.b.b.a.a locala1 = d();
    Object localObject = locala1.b(0);
    Statement localStatement = locald.f();
    TxcRuntimeContext localTxcRuntimeContext = locala.c();
    try
    {
      String str = localg.g() + localg.d(locald) + " FOR UPDATE";
      localg.a(localg.a(locald, str));
      localObject = locala1.b(localStatement, paramVarArgs);
      localg.b(localg.b(locald, str));
      localTxcRuntimeContext.a(localg);
    }
    catch (Throwable localThrowable)
    {
      throw new SQLException(localThrowable);
    }
    return localObject;
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.resourcemanager.a.e.c
 * JD-Core Version:    0.7.0.1
 */